<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "t_u_user".
 *
 * @property integer $id
 * @property string $uid
 * @property string $user_name
 * @property integer $avatar
 * @property string $nick_name
 * @property string $email
 * @property string $passwd
 * @property integer $sex
 * @property string $phone
 * @property string $createtime
 * @property string $modifytime
 */
class TUUser extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 't_u_user';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['uid', 'createtime'], 'required'],
            [['avatar', 'sex'], 'integer'],
            [['createtime', 'modifytime'], 'safe'],
            [['uid', 'nick_name', 'passwd'], 'string', 'max' => 32],
            [['user_name'], 'string', 'max' => 60],
            [['email'], 'string', 'max' => 64],
            [['phone'], 'string', 'max' => 11],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'uid' => 'Uid',
            'user_name' => 'User Name',
            'avatar' => 'Avatar',
            'nick_name' => 'Nick Name',
            'email' => 'Email',
            'passwd' => 'Passwd',
            'sex' => 'Sex',
            'phone' => 'Phone',
            'createtime' => 'Createtime',
            'modifytime' => 'Modifytime',
        ];
    }
}
